<template>
    <div class="back_contain_n ParamSet">
        <div class="leftList">
            <div style="height: 70px; margin-bottom: 12px;">
                <img src="@/assets/back_manage_img/ksh_logo.png" style="width: 100%;height: 100%;" alt="">
            </div>
            <li v-for="(item,index) in paramList" :key="index"
				:class="{'active': viewType == item.index}" @click="changeView(item,item.index)">{{item.name}}</li>
        </div>
        <div class="mainTable">
            <tab1 v-if="viewType == 0" :viewType="viewType"></tab1>
            <tab2 v-if="viewType == 1" :viewType="viewType"></tab2>
            <tab3 v-if="viewType == 2" :viewType="viewType"></tab3>
            <tab4 v-if="viewType == 3" :viewType="viewType"></tab4>
            <tab5 v-if="viewType == 4" :viewType="viewType"></tab5>
            <tab6 v-if="viewType == 5" :viewType="viewType"></tab6>
            <tab7 v-if="viewType == 6" :viewType="viewType"></tab7>
        </div>
    </div>
</template>

<script>
import tab1 from './tab1/index.vue'
import tab2 from './tab2/index.vue'
import tab3 from './tab3/index.vue'
import tab4 from './tab4/index.vue'
import tab5 from './tab5/index.vue'
import tab6 from './tab6/index.vue'
import tab7 from './tab7/index.vue'
export default {
    data() {
        return {
            viewType: 0,
            paramList: [
                { name: "数据中心",index:0},
                { name: "生产任务",index:1},
                { name: "伸包",index:5},
                { name: "U包",index:6},
                { name: "生产调度",index:2},
                { name: "仓储",index:3},
                { name: "运营中心",index:4},
            ],
            addDialog: false,

			codeForm: {
				id:'',
				password: '',
			},
			codeDialog: false,
			opType:'',
        };
    },
    methods: {
        changeView(val,index){
            this.viewType = index
        },
    },
	
    components: {
        tab1,tab2,tab3,tab4,tab5,tab6,tab7
    }
};
</script>

<style lang="scss" scoped>
.ParamSet {
    display: flex;
    height: 100%;
    .leftList {    
        width: 110px;
        margin-right: 40px;
        margin-top: 24px;
        li {
            list-style: none;
            height: 30px;
            line-height: 30px;
            font-size: 12px;
            background: #dddddd;
            border: 1px solid #cccccc;
            color: #333;
            text-align: center;
            cursor: pointer;
            margin-bottom: 10px;
            transition: all .5s;
            &.active {
                background: #00D1D0;
                border: 1px solid #00D1D0;
                color: #fff;
                position: relative;
                &::after {
                    content: ' ';
                    width: 0;
                    height: 0;
                    border-top: 12px solid transparent;
                    border-left: 12px solid #00D1D0;
                    border-bottom: 12px solid transparent;
                    position: absolute;
                    right: -15px;
                    top: 1px;
                }
            }
        }
    }
    .mainTable {
        width: calc(100% - 150px);
    }

	.zll-form {
		padding: 20px 40px 20px 20px;
		.dialog-footer {
			display: flex;
			justify-content: space-evenly;
			margin-top: 15px;
			.zll-botton {
				margin: 0;
			}
		}
	}
}
</style>
